;(function () {
    // 创建echarts实例
    let myChart1 = echarts.init(document.querySelector(".c1"));
    let myChart2 = echarts.init(document.querySelector(".c2"));
    let myChart3 = echarts.init(document.querySelector(".c3"));
  
    // 定义配置（指定图表的配置项和数据）
    let option = {
      // 加水印
      graphic: [
        {
          type: "text",
          top: "50%",
          left: "center",
          style: {
            text: "555",
            fill: "#fff",
            color: "#fff",
            fontSize: 20,
            fontWeight: "bold",
          },
        },
        {
          type: "text",
          top: "40%",
          left: "center",
          style: {
            text: "占比34%",
            fill: "#A6A8B6",
            fontSize: 12,
            fontWeight: "normal",
          },
        },
      ],
      series: [
        {
          type: "pie",
          // radius: "50%",
          radius: [32, 38],
          label: {
            show: false,
          },
          startAngle: 200,
          data: [
            {
              value: 30,
              itemStyle: {
                color: "#333843",
              },
            },
            {
              value: 90,
              itemStyle: {
                color: "#6abaf2",
              },
            },
          ],
        },
      ],
    };
  
    // 使用刚指定的配置项和数据显示图表
    myChart1.setOption(option);
    myChart2.setOption(option);
    myChart3.setOption(option);
  
    window.addEventListener("resize", () => {
      myChart1.resize();
    });
    window.addEventListener("resize", () => {
      myChart2.resize();
    });
    window.addEventListener("resize", () => {
      myChart3.resize();
    });
  })();